package com.insleton.admin.image.model;

import java.util.List;

import com.vteba.annotation.Proto;
import io.swagger.v3.oas.annotations.media.Schema;
import io.protostuff.Tag;

import jakarta.persistence.Transient;
import jakarta.persistence.Id;
import jakarta.persistence.TemporalType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Temporal;
import java.util.Date;

/**
 * 图片资源 Reply Bean，Protobuf协议用于前端数据封装和输出。
 * 
 * @author tongku2008@126.com
 * @since 2025年6月17日 10:30:55
 */
@Proto
@Schema(description = "图片资源响应对象")
public class ImageResourceReply {

	// private static final long serialVersionUID = 1L;
	@Tag(1)
	@Schema(description = "业务状态码，默认1正常，其它异常", type = "Integer")
	private int code;
	@Tag(2)
	@Schema(description = "业务提示信息", type = "String")
	private String message;
	@Tag(3)
	@Schema(description = "返回的数据对象", type = "List<ImageResource>")
	private List<ImageResource> data;
	@Tag(4)
	@Schema(description = "记录总条数", type = "Integer")
	private int total;
	@Tag(5)
	@Schema(description = "返回新增对象Id", type = "String")
	private String id;

	public ImageResourceReply() {
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public List<ImageResource> getData() {
		return data;
	}

	public void setData(List<ImageResource> data) {
		this.data = data;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public static ImageResourceReply create(int code, String message) {
		ImageResourceReply reply = new ImageResourceReply();
		reply.setCode(code);
		reply.setMessage(message);
		return reply;
	}

	public ImageResourceReply response(int code, String message) {
		this.code = code;
		this.message = message;
		return this;
	}

	public ImageResourceReply response(String message) {
		this.code = 10;
		this.message = message;
		return this;
	}
}